<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <?php echo $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); ?>
    <?php echo $this->headTitle(); ?>
    <?php echo $this->headLink(); ?>
    <?php echo $this->headScript(); ?>
    <script type="text/javascript">
        $(document).ready(function() {
            var mainmenu = $('#nav_menu > ul');
            var header = mainmenu.find('ul').parent();
            header.each(function(i) {
                $(this).hover(
                    function(e) {
                        $(this).children("ul:eq(0)").slideDown(200);
                    },
                    function(e) {
                        $(this).children("ul:eq(0)").slideUp(100);
                    }
                );
            });
            
            var controller = '<?php echo Zend_Controller_Front::getInstance()->getRequest()->getControllerName();?>'; 
            if(controller == 'index'){
              $('.home').addClass('active-menu');
            }
            else {
                if((controller == 'product') || (controller == 'category') || (controller == 'provider')){
            		$('.product').addClass('active-menu');
                }
            	else if(controller == 'news'){
            		$('.news').addClass('active-menu');
            	}
            	else if(controller == 'project'){
            		$('.project').addClass('active-menu');
            	}
            	else if(controller == 'evaluation'){
            		$('.evaluation').addClass('active-menu');
            	}
            	else if(controller == 'page'){
            		$('.page').addClass('active-menu');
            	}
                else if(controller == 'user'){
            		$('.user').addClass('active-menu');
            	}
            }
        });
    </script>
</head>
<body>
<div class="container">
    <!-- Begin Header -->
    <div class="header">
        <div class="logo">
            <img src="<?php echo $this->baseUrl('/public/templates/admin/'); ?>images/logo.png" />
        </div>
        
        <?php 
        	$auth = Zend_Auth::getInstance();
        	$infoUser = $auth->getIdentity();
        ?>
        <div class="user_cp">
            <ul>
                <li>Chào mừng, <?php echo $infoUser->username; ?></li>
                <li><a href="<?php echo $this->baseUrl('admincp/user/profile'); ?>">Thông tin</a></li>
                <li><a href="<?php echo $this->baseUrl('admincp/index/logout'); ?>">Thoát</a></li>
            </ul>
        </div>
    </div>
    <!-- End Header -->
    
    <!-- Begin Nav -->
    <div class="nav" id="nav_menu">
        <ul>
            <li><a class="visit_site" target="_blank" href="<?php echo $this->baseUrl(''); ?>">Trang chủ</a></li>
            <li>
                <a class="control product" style="cursor: pointer;">Sản phẩm</a>
                <ul>
                    <li><a href="<?php echo $this->baseUrl('admincp/product'); ?>">Sản phẩm</a></li>
                    <li><a href="<?php echo $this->baseUrl('admincp/category'); ?>">Danh mục sản phẩm</a></li>
                    <li><a href="<?php echo $this->baseUrl('admincp/provider'); ?>">Nhà cung cấp</a></li>
                </ul>
            </li>
            <li><a href="<?php echo $this->baseUrl('admincp/news'); ?>" class="control news">Tin tức</a></li>
            <li><a href="<?php echo $this->baseUrl('admincp/project'); ?>" class="control project">Dự án thi công</a></li>
            <li><a href="<?php echo $this->baseUrl('admincp/evaluation'); ?>" class="control evaluation">Đánh giá</a></li>
            <li><a href="<?php echo $this->baseUrl('admincp/page'); ?>" class="setting page">Quản lý trang</a></li>
            <li><a href="<?php echo $this->baseUrl('admincp/user'); ?>" class="user">Tài khoản đăng nhập</a></li>
        </ul>
    </div>
    <!-- End Nav -->
    
    <div class="sidebar">
        <div class="heading_sidebar">
            <span>Tùy chọn</span>
        </div>
    
        <?php echo $this->layout()->content; ?>
</div>

<!-- Begin Footer -->
<div class="footer">
    <span>Designed by Vinhbt. All Rights Reserved.</span>
</div>
<!-- End Footer -->
</body>
</html>